package com.wt.service;

import com.wt.Pojo.User;
import com.wt.service.fallback.UserServiceFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "PROVIDER",path = "user",fallback = UserServiceFallBack.class)
public interface UserService1 {

    @PostMapping
    public String Add(User user);

    @DeleteMapping("/{id}")
    public String Del(@PathVariable("id") Integer id);


    @PutMapping
    public String Update(User user);


    @GetMapping
    public String Get(@RequestParam("name") String name,@RequestParam("age") Integer age);


    @GetMapping
    public List<User> GetUser(@RequestBody User user);
}
